using AutoMapper;
using DaoService.Model;

namespace UI.Models;

public class PlcInfoMapper
{
    // 配置映射
    private static MapperConfiguration configToModel = new MapperConfiguration(cfg => {
        cfg.CreateMap<PlcInfoEntity,PlcInfo>();
    });

    private static MapperConfiguration configToEntity = new MapperConfiguration(cfg => {
        cfg.CreateMap<PlcInfo,PlcInfoEntity>();
    });
    public static IMapper ToModelMapper
    {
        get
        {
            return configToModel.CreateMapper();
        }
    }
    public static IMapper ToEntityMapper
    {
        get
        {
            return configToEntity.CreateMapper();
        }
    }
}